// This module is licensed and may be used under the terms of the
//  GPL, GNU General Public License, V3 or later, http://www.gnu.org/licenses/gpl.html
//
// Please contact the author if you need another license.
// This module is provided "as is", without warranties of any kind.

import java.net.*;
import java.io.*;


/**
 * Base class for all network communications modules
 * 
 * Project home page: http://code.google.com/p/simple-net-comm/
 * Author: Jonathan Bonazza
 * License: GPL
 */
public class NetComm
{
	protected String uid;		//Unique ID of the client
	protected int port;		//The logical network port used for communications
	protected String address;	//The network address used for communications
	protected Socket soc;		//The network communications socket

	public NetComm(String uid, String addr, int port) throws IOException
	{
		this.uid = uid;
		this.port = port;
		this.address = addr;

		soc = new Socket(address, port);
	}

	//Accessor method
	public String getUID()
	{
		return uid;
	}
}
